Computing devices are initialized by firmware included within the device and this firmware provides a range of software services which facilitate the boot of the operating system (OS) as well as providing a smaller subset of these services that continue to be available after the operating system has booted. Firmware is software that has been written onto Read-Only Memory (ROM) modules including but not limited to ROM, PROM, EPROM, EEPROM, and Flash memory (collectively referred to hereafter as “ROM”). Among other services, the firmware is responsible for operation of the computing device until a boot process can be run which loads an operating system for the computing device into memory. Once loaded, the operating system is in charge of normal operation of the computing device although the provision of certain services after loading of the operating system may require a transition of control from the operating system back to the firmware for security reasons. For example, firmware may be used to provide key error fixes, updates, work-arounds for issues such as those affecting a particular sleep-state for the computing device or to provide additional functionality to the computing device. The changes may be made by the firmware instead of the OS as access to the firmware may be restricted and the changes can therefore be implemented in a more secure manner than when the OS has control of the computing device.
A computing device may contain one or more elements known as Central Processing Units (CPUs). These CPUs may have a normal operating mode and a second operating mode called System Management Mode (SMM). When the CPU is in normal operating mode it can access all elements of the computer except certain memory regions exclusively dedicated to SMM. In contrast, when the CPU is operating in SMM it is able to access all elements of the computing device including the memory locations allocated for SMM. The CPU may be directed to transition from normal operating mode to SMM by a number of triggers called System Management Interrupts (SMI) events. The exact triggers available differ somewhat from among system designs but the result of an SMI being triggered is that execution in main memory is immediately suspended and execution begins at a specific location in SMM memory.
Conventionally one technique for utilizing firmware to implement changes to a computing device has made use of SMM. For example, computing platforms may be configured so that a transition to a sleep-state by the OS causes an SMI to be generated by noting when a sleep register for the computing device is written to by the OS. The firmware code running in SMM may be written so as to perform special processing before performing the requested sleep transition. Functional equivalents to SMM such as TrustZone on an Advanced/Acorn RISC Machine (ARM) processor could also be utilized in this manner. In other conventional approaches, the portion of the operating system that provides the final sleep-state transition may provide a dedicated call-out to a firmware provided function. However, all of these conventional techniques require that the computing platform support a dedicated means for the change to occur before they can be utilized such as specific firmware function calls, SMM or an equivalent mode of operation.